package com.lyf.design.practice.theory.structure.adapter;

/**
 * @author LYF
 * @date 2022/6/22
 */
public class ChinaCharge implements Charge{
    @Override
    public void charge(Device device) throws Exception {
       if(device.getElectronic()!=220)
       {
           throw new Exception("cant charge...");
       }
        System.out.println("charging..");
    }
}
